<template>
	<div>
		<div id="SellerSignup" v-if="payType == 'auction_deposit'">
			<x-header :left-options="{showBack: false}" title="卖家保证金" class="header">
				<a slot="left" @click="back()"><i class="tp-icon icon-black-back"></i></a>
			</x-header>
			<div class="deposit">
				<h2 class="vux-1px-b">拍品信息</h2>
				<div class="deposit-info vux-1px-b">
					<img :src="'/los' + payList.goods.goods_thumb" alt="" />
					<div class="desc">
						<p class="goods-name">{{payList.goods.goods_name}}</p>
						<p class="timer">截拍时间：{{timer2time(payList.auction_goods.auction_endtime)}}</p>
					</div>
				</div>
				<div class="price">
					<span class="left">起拍价：￥{{payList.auction_goods.auction_startprice}}</span>
					<span class="right">加价幅度：￥{{payList.auction_goods.auction_step}}</span>
				</div>
			</div>
			<div class="deposit-way">
				<h2 class="vux-1px-b">保证金：<span>￥{{payList.auction_goods.auction_deposit}}</span><b>（正常交易全额退还）</b></h2>
				<ul>
					<li class="vux-1px-b">
						<check-icon :value.sync="agree" class="check"></check-icon>
						<img src="../assets/images/home/icon_wechat.png" alt="" />
						<div class="wechat">
							<div class="rec">
								<b>微信零钱</b>
								<span>推荐</span>
							</div>
							<p>单笔最高额度50,000</p>
						</div>
					</li>
					<!--<li>
						<check-icon :value.sync="agreeCar" class="check"></check-icon>
						<img src="../assets/images/home/icon_wechat.png" alt="" />
						<div class="wechat">
							<div class="rec">
								<b>账户可用余额支付</b>
							</div>
							<p>可用余额：￥548</p>
						</div>
						<span class="kaitong">开通</span>
					</li>-->
				</ul>
			</div>
			<div class="paynow" @click="payNow()">立即支付</div>
		</div>

		<div id="PaymentPage" v-else>
			<x-header :left-options="{showBack: false}" title="确认订单" class="header">
				<a slot="left" @click="back()"><i class="tp-icon icon-black-back"></i></a>
			</x-header>
			<div class="addInfo" v-if="payType == 'auction_signup'" @click="addList(payType,payList.signup_id)">
				<p v-if="addressInfo == ''">点击添加地址</p>
				<div v-else>
					<div class="top_bar">
						<p><span>收&nbsp;货&nbsp;人 &nbsp;:  &nbsp;{{addressInfo.receiver_name}}</span><b v-model="tel">{{addressInfo.receiver_tel}}</b><i v-if="addressInfo.receiver_default == 1">默认</i></p>
					</div>
					<div class="down_bar">
						<img src="../assets/images/home/icon_address.png" alt="" />
						<div>
							<span>收货地址 :</span>
							<p>{{addressInfo.receiver_province}}{{addressInfo.receiver_city}}{{addressInfo.receiver_county}}{{addressInfo.receiver_address}}</p>
						</div>
					</div>
					<div class="right_bar">
						<img src="../assets/images/home/icon_right.png" alt="" />
					</div>
				</div>
			</div>
			<div class="addInfo" v-else @click="addList(payType,payList.order_sn)">
				<p v-if="addressInfo == ''">点击添加地址</p>
				<div v-else>
					<div class="top_bar">
						<p><span>收&nbsp;货&nbsp;人 &nbsp;:  &nbsp;{{addressInfo.receiver_name}}</span><b v-model="tel">{{addressInfo.receiver_tel}}</b><i v-if="addressInfo.receiver_default == 1">默认</i></p>
					</div>
					<div class="down_bar">
						<img src="../assets/images/home/icon_address.png" alt="" />
						<div>
							<span>收货地址 :</span>
							<p>{{addressInfo.receiver_province}}{{addressInfo.receiver_city}}{{addressInfo.receiver_county}}{{addressInfo.receiver_address}}</p>
						</div>
					</div>
					<div class="right_bar">
						<img src="../assets/images/home/icon_right.png" alt="" />
					</div>
				</div>
			</div>
			<div class="border_img"><img src="../assets/images/home/icon_border.png" alt="" /></div>
			<div class="shopInfo">
				<div class="title_bar">
					<img v-if="payList.shop_id == undefined" src="../assets/images/home/defaultImg.jpg" alt="" class="photo" />

					<img v-else :src="'/los/uploads/thumb/shop/' + payList.shop_id + '_78X78.jpeg'" alt="" class="photo" />
					<div>
						<span>{{payList.shop_name}}</span>
						<img src="../assets/images/home/icon_right.png" alt="" />
					</div>
				</div>
				<div class="buyInfo">
					<div class="pic_bar">
						<img v-if="payList.goods_thumb == undefined" src="../assets/images/home/defaultImg.jpg" alt="" />
						<img v-else :src="'/los' + payList.goods_thumb" alt="" />
						<div class="right">
							<p>{{payList.goods_name}}</p>
							<div class="numWrap">
								<b v-if="payType == 'seckill_order'">￥{{payList.seckill_price}}</b>
								<b v-else>￥{{payList.pay_money}}</b>
							</div>
							<div class="goods_num" v-if="payList.goods_num"> X {{payList.goods_num}}</div>
							<div class="goods_num" v-else> X 1</div>
						</div>
					</div>
					<div class="promise" v-model="delivery" @click="delivery = !delivery" v-if="payType != 'auction_signup'">
						<p><span>配送方式</span><img src="../assets/images/home/icon_right2.png" alt="" />
							<b>{{checked}}</b>
						</p>
					</div>
					<div class="promise">
						<p><span>订单号</span><b>{{payList.pay_sn}}</b></p>
					</div>
					<group class="textarea">
						<x-textarea @input="infoInput($event)" :value="payList.order_message" title="买家留言" id="text" :max="400" placeholder="给商家留言(选填)" :show-counter="false" :height="220" :rows="8" :cols="30"></x-textarea>
					</group>
				</div>
			</div>
			<div class="pay_bar">
				<span>合计付款:￥{{payList.pay_money}}</span>
				<b @click="payNow(addressInfo.receiver_id)">立即付款</b>
			</div>
			<popup v-model="delivery" class="delivery">
				<h2>配送方式</h2>
				<radio :selected-label-style="{color: '#a30000'}" @on-change="change" :options="method" class="type"></radio>
			</popup>
			<toast v-model="success" type="text" width="5rem">{{msg}}</toast>
		</div>

	</div>
</template>
<script>
	import $ from 'jquery'
	import axios from 'axios'
	import wx from 'weixin-js-sdk';
	import Cookies from 'js-cookie'
	import { XHeader, Group, dateFormat, XTextarea, CheckIcon, Datetime, XNumber, Toast, Popup, Checker, CheckerItem, Radio } from 'vux'
	export default {
		filters: {
			dateFormat
		},
		data() {
			return {
				timer: '',
				tel: '12345678912',
				value: 2,
				payList: {
					shop_logo: ''
				},
				intro: '',
				success: false,
				agree: true,
				agreeCar: true,
				checked: '快递配送',
				delivery: false,
				hackReset: '',
				msg: '',
				send_time: '',
				addressList: [],
				payType: '',
				msg: '',
				count: '',
				nums: '',
				wxSign: '',
				addressInfo: '',
				pay_sn: '',
				totalPrice: '',
				shareUrl: '',
				signupCuttime: '',
				auctionBuyTime: '',
				method: [{
						key: 1,
						value: '快递配送'
					},
					{
						key: 2,
						value: '上门自取'
					}
				]
			}
		},
		components: {
			XHeader,
			Group,
			XTextarea,
			Datetime,
			XNumber,
			Toast,
			Popup,
			Checker,
			CheckerItem,
			Radio,
			CheckIcon,
			dateFormat
		},
		beforeRouteEnter(to, from, next) {
			if(to.name == 'PaymentPage' && from.name != null) {
				var ua = navigator.userAgent.toLowerCase();
				if(/iphone|ipad|ipod/.test(ua)) {
					if(sessionStorage.getItem('isReload') == 'true') {
						sessionStorage.setItem('isReload', false);
						console.log(sessionStorage.getItem('isReload'));
						location.reload();
						next()
					}
				} else {
					next()
				}
			}
			next()
		},
		mounted() {
			this.goodsBuyInfo();
			//将时间戳转换成日期的封装函数
			Date.prototype.Format = function(fmt) {
				var o = {
					"M+": this.getMonth() + 1,
					"d+": this.getDate(),
					"h+": this.getHours(),
					"m+": this.getMinutes(),
					"s+": this.getSeconds(),
					"q+": Math.floor((this.getMonth() + 3) / 3),
					"S": this.getMilliseconds()
				};
				if(/(y+)/.test(fmt))
					fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
				for(var k in o)
					if(new RegExp("(" + k + ")").test(fmt))
						fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
				return fmt;
			}
		},
		methods: {
			change(value, label) {
				this.checked = label;
			},
			goodsBuyInfo: function() {
				let _this = this;
				let pay_sn = this.$route.params.id;
				this.request_get('/los/api/wxpay/info.json?pay_sn=' + pay_sn, function(res) {
					_this.payType = res.data.data.pay_from;
					if(_this.payType == 'auction_order') {
						axios.get('/los/api/auction/order_pay.json?pay_sn=' + pay_sn).then((result) => {
							_this.payList = result.data.auction_order;
							if(_this.payList.receiver_id == 0) {
								_this.getAddressInfo();
							} else {
								_this.addressInfo = {
									receiver_id: _this.payList.receiver_id,
									receiver_name: _this.payList.receiver_name,
									receiver_province: _this.payList.receiver_province,
									receiver_city: _this.payList.receiver_city,
									receiver_county: _this.payList.receiver_county,
									receiver_tel: _this.payList.receiver_tel,
									receiver_address: _this.payList.receiver_address
								};
							}
						}).catch((err) => {
							console.log(err);
						})
					} else if(_this.payType == 'seckill_order') {
						//秒杀
						axios.get('/los/api/seckill/order_pay.json?pay_sn=' + pay_sn).then((result) => {
							_this.payList = result.data.seckill_order;
							_this.nums = _this.payList.goods_num;
							if(_this.payList.receiver_id == 0) {
								_this.getAddressInfo();
							} else {
								_this.addressInfo = {
									receiver_id: _this.payList.receiver_id,
									receiver_name: _this.payList.receiver_name,
									receiver_province: _this.payList.receiver_province,
									receiver_city: _this.payList.receiver_city,
									receiver_county: _this.payList.receiver_county,
									receiver_tel: _this.payList.receiver_tel,
									receiver_address: _this.payList.receiver_address
								};
							}
						}).catch((err) => {
							console.log(err);
						})
					} else if(_this.payType == 'auction_signup') {
						//保证金
						axios.get('/los/api/auction/signup_pay.json?pay_sn=' + pay_sn).then((result) => {
							_this.payList = result.data.data;
							console.log('当前时间：' + result.data.cur_time);
							console.log('结拍时间：' + _this.payList.auction_endtime);
							_this.signupCuttime = result.data.cur_time;
							_this.auctionBuyTime = Number(_this.payList.auction_endtime - 300);
							if(_this.payList.receiver_id == 0) {
								_this.getAddressInfo();
							} else {
								_this.addressInfo = {
									receiver_id: _this.payList.receiver_id,
									receiver_name: _this.payList.receiver_name,
									receiver_province: _this.payList.receiver_province,
									receiver_city: _this.payList.receiver_city,
									receiver_county: _this.payList.receiver_county,
									receiver_tel: _this.payList.receiver_tel,
									receiver_address: _this.payList.receiver_address
								};
							}
						}).catch((err) => {
							console.log(err);
						})
					} else if(_this.payType == 'auction_deposit') {
						_this.payList = res.data.auction_deposit;
					}

				});
			},
			//获取地址列表信息
			getAddressInfo: function() {
				this.$http({
					method: 'GET',
					url: '/los/api/member/receiver_default.json',
					data: ''
				}).then((result) => {
					console.log(result);
					if(result.data.code == 1) {
						this.addressInfo = result.data.data;
					} else {
						this.addressInfo = ''
					}
				}).catch((err) => {
					console.log(err);
				})
			},

			request_post: function(url, params, success = function(res) {}, error = function(err) {}) {
				this.$http({
					method: 'POST',
					url: url,
					data: params
				}).then((result) => {
					success(result);
				}).catch((err) => {
					console.log(err);
					error(err);
				})
			},
			request_get: function(url, success = function(res) {}, error = function(err) {}) {
				this.$http({
					method: 'GET',
					url: url,
				}).then((result) => {
					success(result);
				}).catch((err) => {
					console.log(err);
					error(err);
				})
			},
			//微信支付获取时间戳
			getSign: function() {
				let pay_sn = this.$route.params.id;
				let urls = window.location.href;
				var ua = navigator.userAgent.toLowerCase();
				this.shareUrl = urls;
				var params = {
					url: this.shareUrl,
				}
				this.$http({
					method: 'POST',
					url: '/los/api/oauth/script',
					data: params,
				}).then((result) => {
					if(result) {
						wx.config({
							debug: result.data.debug,
							appId: result.data.appId,
							timestamp: result.data.timestamp,
							nonceStr: result.data.nonceStr,
							signature: result.data.signature,
							jsApiList: result.data.jsApiList,
						});
					} else {
						alert('获取信息失败 请重新尝试');
					}
				}).catch((err) => {
					console.log(err);
				})
			},
			//点击立即付款
			payNow: function(receiver_id) {
				let pay_sn = this.$route.params.id;
				var params = {
					pay_sn: pay_sn,
					receiver_id: receiver_id,
					order_message: this.intro,
					express_comanay: this.checked
				}
				console.log(params);
				this.$nextTick(() => {
					this.getSign();
					console.log(this.payType);
					if(this.payType == 'auction_order') {
						this.auction_order_pay(params);
					} else if(this.payType == 'auction_signup') {
						this.auction_signup_pay(params);
					} else if(this.payType == 'seckill_order') {
						this.seckill_order_pay(params);
					} else if(this.payType == 'auction_deposit') {
						this.auction_deposit_pay();
					}
				})
			},
			//拍品
			auction_order_pay: function(params) {
				var _this = this;
				if(this.addressInfo == '') {
					this.success = !this.success;
					this.msg = '请添加地址信息';
				} else {
					this.request_post('/los/api/auction/order_pay.json', params, function(res) {
						if(res.data.code == 1) {
							_this.request_get('/los' + res.data.url, function(res) {
								if(res.data.code == 1) {
									_this.pay_sn = res.data.data.pay_sn;
									_this.request_get('/los' + res.data.url + '?pay_sn=' + _this.pay_sn, function(res) {
										_this.success = !_this.success;
										_this.msg = '等待支付';
										wx.chooseWXPay({
											timestamp: res.data.wxpay_jsapi_parameters.timeStamp,
											nonceStr: res.data.wxpay_jsapi_parameters.nonceStr,
											package: res.data.wxpay_jsapi_parameters.package,
											signType: res.data.wxpay_jsapi_parameters.signType,
											paySign: res.data.wxpay_jsapi_parameters.paySign,
											success: function(res) {
												if(res.errMsg == "chooseWXPay:ok") {
													_this.request_get('/los/api/wxpay/res/?pay_sn=' + _this.pay_sn, function(res) {
														if(res.data.wxpay_res.result_code == "SUCCESS" && res.data.wxpay_res.return_code == "SUCCESS") {
															location.href = '#/OrderInfo/order_sn/' + res.data.auction_order.order_sn;
														}
													})
												} else {
													alert('支付失败');
												}
											},
											cancel: function(res) {
												_this.success = !_this.success;
												_this.msg = '取消支付';
											}
										});
									})
								}
							})
						}
					})
				}
			},
			//保证金
			auction_signup_pay: function(params) {
				console.log('parmas:' + params);
				var _this = this;
				if(this.signupCuttime > this.auctionBuyTime) {
					this.success = !this.success;
					this.msg = '拍品即将结束 不可缴纳保证金';
				} else if(this.addressInfo == '') {
					this.success = !this.success;
					this.msg = '请添加地址信息';
				} else {
					this.request_post('/los/api/auction/signup_pay.json', params, function(res) {
						if(res.data.code == 1) {
							_this.request_get('/los' + res.data.url, function(res) {
								if(res.data.code == 1) {
									_this.pay_sn = res.data.data.pay_sn;
									_this.request_get('/los' + res.data.url + '?pay_sn=' + _this.pay_sn, function(res) {
										_this.success = !_this.success;
										_this.msg = '等待支付';
										wx.chooseWXPay({
											timestamp: res.data.wxpay_jsapi_parameters.timeStamp,
											nonceStr: res.data.wxpay_jsapi_parameters.nonceStr,
											package: res.data.wxpay_jsapi_parameters.package,
											signType: res.data.wxpay_jsapi_parameters.signType,
											paySign: res.data.wxpay_jsapi_parameters.paySign,
											success: function(res) {
												if(res.errMsg == "chooseWXPay:ok") {
													_this.request_get('/los/api/wxpay/res/?pay_sn=' + _this.pay_sn, function(res) {
														if(res.data.wxpay_res.result_code == "SUCCESS" && res.data.wxpay_res.return_code == "SUCCESS") {
															location.href = '#/Detail/id/' + res.data.auction_signup.auction_id;
														}
													})
												} else {
													alert('支付失败');
												}
											},
											cancel: function(res) {
												_this.success = !_this.success;
												_this.msg = '取消支付';
											}
										});
									})
								}
							})
						} else if(result.data.code == 0) {
							_this.success = !_this.success;
							_this.msg = result.data.msg;
						}
					})
				}
			},
			//秒杀
			seckill_order_pay: function(params) {
				var _this = this;
				if(this.addressInfo == '') {
					this.success = !this.success;
					this.msg = '请添加地址信息';
				} else {
					this.request_post('/los/api/seckill/order_pay.json', params, function(res) {
						if(res.data.code == 1) {
							_this.request_get('/los' + res.data.url, function(res) {
								if(res.data.code == 1) {
									_this.pay_sn = res.data.data.pay_sn;
									_this.request_get('/los' + res.data.url + '?pay_sn=' + _this.pay_sn, function(res) {
										_this.success = !_this.success;
										_this.msg = '等待支付';
										wx.chooseWXPay({
											timestamp: res.data.wxpay_jsapi_parameters.timeStamp,
											nonceStr: res.data.wxpay_jsapi_parameters.nonceStr,
											package: res.data.wxpay_jsapi_parameters.package,
											signType: res.data.wxpay_jsapi_parameters.signType,
											paySign: res.data.wxpay_jsapi_parameters.paySign,
											success: function(res) {
												_this.request_get('/los/api/wxpay/res/?pay_sn=' + _this.pay_sn, function(res) {
													if(res.data.wxpay_res.result_code == "SUCCESS" && res.data.wxpay_res.return_code == "SUCCESS") {
														location.href = '#/OrderInfo/order_sn/' + res.data.seckill_order.order_sn;
													}
												})
											},
											cancel: function(res) {
												_this.success = !_this.success;
												_this.msg = '取消支付';
											}
										});
									})
								}
							})
						}
					})
				}
			},
			//上拍支付保证金
			auction_deposit_pay: function() {
				let pay_sn = this.$route.params.id;
				let _this = this;
				this.request_get('/los/api/wxpay/?pay_sn=' + pay_sn, function(res) {
					wx.chooseWXPay({
						timestamp: res.data.wxpay_jsapi_parameters.timeStamp,
						nonceStr: res.data.wxpay_jsapi_parameters.nonceStr,
						package: res.data.wxpay_jsapi_parameters.package,
						signType: res.data.wxpay_jsapi_parameters.signType,
						paySign: res.data.wxpay_jsapi_parameters.paySign,
						success: function(res) {
							_this.request_get('/los/api/wxpay/res/?pay_sn=' + pay_sn, function(res) {
								if(res.data.wxpay_res.result_code == "SUCCESS" && res.data.wxpay_res.return_code == "SUCCESS") {
									location.href = '#/Detail/id/' + res.data.auction_deposit.auction_id;
								}
							})
						},
						cancel: function(res) {}
					});
				})
			},

			addList: function(order_from, order_sn) {
				this.$router.push({
					name: 'AddressList',
					params: {
						order_from: order_from,
						order_sn: order_sn,
					}
				})
			},
			//将时间戳转换成日期
			timer2time: function(time) {
				return new Date(parseInt(time) * 1000).Format("yyyy-MM-dd hh:mm:ss");
			},
			back: function() {
				window.history.go(-1);
			},
			addHide: function() {
				$('#PaymentPage').show();
				$('#addCheck').hide();
			},
			infoInput: function(e) {
				this.intro = e;
			},
		}
	}
</script>

<style scoped>
	.header {
		background: #fff!important;
	}
	
	.addInfo {
		width: 100%;
		height: 2.61rem;
		background: #fff;
		padding: 0.26rem;
		position: relative;
	}
	
	.addInfo:before {
		content: " ";
		position: absolute;
		left: 0;
		top: 0;
		right: 0;
		height: 1px;
		border-top: 1px solid #f3f3f3;
		color: #e6e6e6;
		transform-origin: 0 0;
		transform: scaleY(0.5);
	}
	
	.addInfo .top_bar {
		width: 7.36rem;
		height: 0.66rem;
		line-height: 0.66rem;
		margin-left: 0.53rem;
		color: #333;
		overflow: hidden;
		font-size: 0.37rem;
	}
	
	.addInfo .top_bar b {
		font-weight: normal;
		margin-left: 1.04rem;
	}
	
	.addInfo .top_bar i {
		float: right;
		border: solid 1px #da4240;
		width: 0.98rem;
		height: 0.4rem;
		line-height: 0.4rem;
		border-radius: 0.05rem;
		font-style: normal;
		font-size: 0.29rem;
		color: #da4240;
		text-align: center;
		margin-top: 0.1rem;
	}
	
	.addInfo .down_bar {
		width: 8rem;
		margin-top: 0.13rem;
		overflow: hidden;
		font-size: 0.32rem;
		color: #777;
		height: 1.44rem;
	}
	
	.addInfo .down_bar img {
		float: left;
		width: 0.4rem;
		margin-right: 0.14rem;
		margin-top: 0.05rem;
		border-radius: 0.05rem;
	}
	
	.addInfo .down_bar>div {
		position: relative;
		width: 100%;
		margin-bottom: 0.42rem;
		height: 1.06rem;
	}
	
	.addInfo .down_bar>div span {
		line-height: 0.5rem;
	}
	
	.addInfo .down_bar p {
		position: absolute;
		left: 2.2rem;
		top: 0;
		line-height: 0.5rem;
	}
	
	.addInfo .right_bar {
		right: 0.26rem;
		top: 1.09rem;
		position: absolute;
		width: 0.37rem;
		height: 0.37rem;
	}
	
	.addInfo .right_bar img {
		width: 100%;
		height: 100%;
		border-radius: 0.05rem;
	}
	
	.border_img {
		margin-top: -0.16rem;
	}
	
	.border_img img {
		width: 100%;
		height: 100%;
	}
	
	.shopInfo {
		width: 100%;
		margin-top: 0.26rem;
		overflow: hidden;
		background: #fff;
	}
	
	.shopInfo .title_bar {
		height: 1.17rem;
		line-height: 1.17rem;
	}
	
	.shopInfo .title_bar .photo {
		width: 0.74rem;
		height: 0.74rem;
		margin: 0.21rem 0.26rem;
		float: left;
		border-radius: 0.05rem;
	}
	
	.shopInfo .title_bar>div {
		float: left;
		font-size: 0.37rem;
		color: #333;
		width: 85%;
	}
	
	.shopInfo .title_bar>div span {
		height: 1.17rem;
		line-height: 1.17rem;
		display: inline-block;
	}
	
	.shopInfo .title_bar>div img {
		width: 0.26rem;
		height: 0.26rem;
		margin-left: 0.4rem;
		float: right;
		margin-top: 0.4rem;
	}
	
	.shopInfo .buyInfo {
		margin: 0 0.26rem;
		position: relative;
	}
	
	.shopInfo .buyInfo:before {
		content: " ";
		position: absolute;
		left: 0;
		top: 0;
		right: 0;
		height: 1px;
		border-top: 1px solid #e6e6e6;
		color: #e6e6e6;
		transform-origin: 0 0;
		transform: scaleY(0.5);
	}
	
	.shopInfo .buyInfo .pic_bar {
		padding: 0.4rem 0;
		width: 100%;
		height: 2.8rem;
	}
	
	.shopInfo .buyInfo .pic_bar:after {
		content: " ";
		position: absolute;
		left: 0;
		top: 2.8rem;
		right: 0;
		height: 1px;
		border-bottom: 1px solid #e6e6e6;
		color: #e6e6e6;
		transform-origin: 0 0;
		transform: scaleY(0.5);
	}
	
	.shopInfo .buyInfo .pic_bar img {
		width: 2.05rem;
		height: 2.05rem;
		float: left;
		border-radius: 0.05rem;
	}
	
	.shopInfo .buyInfo .pic_bar .right {
		float: left;
		margin-top: 0.05rem;
		margin-left: 0.34rem;
		height: 1.92rem;
		width: 6.93rem;
		position: relative;
	}
	
	.shopInfo .buyInfo .pic_bar .right p {
		font-size: 0.34rem;
		line-height: 0.5rem;
		color: #333;
		height: 1rem;
		overflow: hidden;
	}
	
	.shopInfo .buyInfo .pic_bar .right b {
		font-weight: normal;
		color: #DA4240;
		font-size: 0.42rem;
		display: block;
		float: left;
	}
	
	.shopInfo .buyInfo .pic_bar .numWrap {
		float: left;
		margin-top: 0.5rem;
	}
	
	.shopInfo .buyInfo .pic_bar .right .goods_num {
		float: right;
		font-size: 0.37rem;
		margin-top: 0.5rem;
	}
	/*处理加减号问题*/
	
	.shopInfo .buyInfo .pic_bar .right .calculator {
		float: right;
	}
	
	.shopInfo .buyInfo .promise {
		height: 1.3rem;
		line-height: 1.3rem;
		color: #333;
		overflow: hidden;
		position: relative;
		border-bottom: solid 1px #f3f3f3;
	}
	
	.shopInfo .buyInfo .promise span {
		float: left;
		font-size: 0.34rem;
	}
	
	.shopInfo .buyInfo .promise b {
		float: right;
		font-weight: normal;
		font-size: 0.34rem;
	}
	
	.shopInfo .buyInfo .promise img {
		float: right;
		width: 0.32rem;
		height: 0.32rem;
		margin-top: 0.5rem;
	}
	
	.shopInfo .buyInfo .sendTime {
		height: 1.3rem!important;
		line-height: 1.3rem!important;
		margin: 0 0.26rem;
		overflow: hidden;
	}
	
	.textarea .weui-label {
		font-size: 0.26rem!important;
	}
	
	.pay_bar {
		position: fixed;
		bottom: 0;
		line-height: 1.3rem;
		height: 1.3rem;
		background: #fff;
		width: 100%;
		overflow: hidden;
		border-top: solid 1px #f3f3f3;
	}
	
	.pay_bar span {
		float: left;
		text-align: right;
		width: 6rem;
		color: #da4240;
		font-size: 0.34rem;
	}
	
	.pay_bar b {
		float: right;
		font-weight: normal;
		width: 3.33rem;
		background: #a30000;
		color: #fff;
		font-size: 0.42rem;
		line-height: 1.3rem;
		height: 1.3rem;
		text-align: center;
	}
	
	.delivery {
		height: 50%!important;
		background: #fff;
		padding: 0.4rem 0.26rem;
	}
	
	.delivery h2 {
		margin-bottom: 0.4rem;
	}
	
	.delivery .type {
		width: 100%;
		font-size: 0.37rem;
		height: 0.9rem;
		line-height: 0.9rem;
		padding: 0;
	}
	/*卖家保证金*/
	
	.deposit {
		margin-top: 0.26rem;
		background: #fff;
		padding: 0 0.26rem;
	}
	
	.deposit h2 {
		font-size: 0.4rem;
		color: #333;
		height: 1.14rem;
		line-height: 1.14rem;
	}
	
	.deposit .deposit-info {
		overflow: hidden;
		padding: 0.4rem 0;
	}
	
	.deposit .deposit-info img {
		float: left;
		width: 2.05rem;
		height: 2.05rem;
		border-radius: 0.05rem;
		margin-right: 0.32rem;
	}
	
	.deposit .deposit-info .desc {
		float: left;
		width: 74%;
	}
	
	.deposit .deposit-info .desc .goods-name {
		font-size: 0.37rem;
		color: #333;
		line-height: 0.56rem;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	
	.deposit .deposit-info .desc .timer {
		margin-top: 1rem;
		font-size: 0.32rem;
		color: #777;
	}
	
	.deposit .price {
		height: 0.8rem;
		line-height: 0.8rem;
		overflow: hidden;
		font-size: 0.32rem;
		color: #777;
	}
	
	.deposit .price .left {
		float: left;
	}
	
	.deposit .price .right {
		float: right;
	}
	
	.deposit-way {
		margin-top: 0.26rem;
		background: #fff;
		padding: 0 0.26rem;
	}
	
	.deposit-way h2 {
		height: 1.01rem;
		line-height: 1.01rem;
		font-size: 0.4rem;
		color: #333;
	}
	
	.deposit-way h2 span {
		color: #dd2828;
	}
	
	.deposit-way h2 b {
		font-weight: normal;
		color: #777;
	}
	
	.deposit-way ul li {
		width: 100%;
		overflow: hidden;
		padding: 0.4rem 0;
	}
	
	.deposit-way ul li img {
		width: 1.06rem;
		height: 1.06rem;
		float: left;
	}
	
	.deposit-way ul li .check {
		float: left;
		margin-top: 0.21rem;
		margin-right: 0.46rem;
	}
	
	.deposit-way ul li .wechat {
		width: 60%;
		float: left;
		margin-left: 0.21rem;
		overflow: hidden;
	}
	
	.deposit-way ul li .wechat .rec {
		overflow: hidden;
	}
	
	.deposit-way ul li .wechat b {
		font-size: 0.37rem;
		color: #333;
		float: left;
		font-weight: normal;
	}
	
	.deposit-way ul li .wechat span {
		float: left;
		color: #ff8f3d;
		font-size: 0.26rem;
		background: #fff2e9;
		margin-top: 0.05rem;
		padding: 0 0.13rem;
		border-radius: 0.05rem;
		margin-left: 0.26rem;
	}
	
	.deposit-way ul li .wechat p {
		margin-top: 0.15rem;
		color: #aaa;
		font-size: 0.32rem;
	}
	
	.deposit-way ul li .kaitong {
		float: right;
		font-size: 0.37rem;
		color: #d13e3a;
		margin-top: 0.32rem;
	}
	
	.paynow {
		margin: 4.29rem 0.4rem 0.4rem;
		width: 9.2rem;
		height: 1.17rem;
		background: #A30000;
		color: #fff;
		font-size: 0.45rem;
		text-align: center;
		line-height: 1.17rem;
		border-radius: 0.1rem;
	}
</style>